<%@ page language="java" import="java.util.*,com.duapk.common.*,java.net.URLEncoder,java.util.*,com.duapk.web.util.*" pageEncoding="utf-8"%><%@ page session="false"%>
<?xml version="1.0" encoding="utf-8"?><%String path = request.getContextPath();double m = Math.random();%>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<link rel="Shortcut Icon" href="http://www.duapk.com/favicon.ico" />
<link rel="Bookmark" href="http://www.duapk.com/favicon.ico" />
<title>${requestScope.result.keyword}-安卓快搜</title> 
<style type="text/css"> 
.allsize{font-size:10px;}a em{text-decoration:underline;}em{font-style:normal;color:#C60A00;}.cp{text-align: center;}.page{font-size:16px;}
.app-block{
	width:auto; height:auto; overflow:hidden; border:1px solid #ccc;
	background-color:#60d6a9;
	font-size:13px;
}
</style> 
</head> 
<body>
<div class="allsize">
<div>
<%String type = (String)request.getAttribute("t");SearchResult searchResult = (SearchResult)request.getAttribute("result");int totalItem = searchResult.getTotalItem();List<Result> list = searchResult.getResultList();%>
<form name="s" action="s" method="get">
<div id=s_search_form>
<input class="search_input" id="smart_input" value="${requestScope.result.keyword}" name="q" autocomplete="off" >
<input id="s1" class="search_button" type="submit" value="安卓快搜"/> 
<input id="s1" type="hidden" name="m" value="<%=m%>" /> 
</div>
</form>
</div>
<% if(totalItem>0){ %>找到<%=totalItem%>个与<em>${requestScope.result.keyword}</em>相关的应用<%}%>
<% if(list != null && !list.isEmpty()){
	for(int i=0; i<list.size(); i++){
		Result model = list.get(i);String detailUrl = model.getDetailUrl();String title = model.getTitle();String hlTitle = model.getHighlightTitle();
		String content = model.getDescription();String downloadUrl = model.getDownloadUrl();String _title = URLEncoder.encode(title,"UTF-8");String category = model.getCategory();String version = model.getVersion();String size = model.getSize();
%>
<div class="resitem"><a href="<%=path%>/v?u=<%=detailUrl%>&amp;n=<%=title%>"><div class="app-block"><%=i+1%>&#160;<%=hlTitle%></div></a><div>
<%if(content!=null&&content.trim().length()!=0){ %><%=content%><br/><%}%>		
文件大小:<%= size %>&nbsp;<%if(version!=null&&version.trim().length()>0){%>应用版本:[<%=version%>]<%}%>
<br/><a href="<%=downloadUrl%>">直接下载</a>|<a href="<%=path%>/s?q=<%=_title%>&m">相关搜索</a><br/></div></div> 
<%}
	}else{out.write("<div>抱歉，没有找到与“"+ searchResult.getKeyword() +"”相关的应用。</div>");}%>
 
<div class="page">	 
<%
if(totalItem>10){
	String q = searchResult.getKeyword();q = URLEncoder.encode(q, "utf-8");
	int current = searchResult.getPageID();int totalPage = (int)Math.ceil(totalItem / (double) (Double.valueOf(10)));
	if(current > 1){out.write("<a class='flag_pg' href='"+path+"/s?q="+q+"&amp;p="+(current-1)+"&amp;m="+m+"&amp;t="+type+"'>&lt;</a>&nbsp;");}
	int start = 1;int end = current + 9;if(end > totalPage){end = totalPage;}
	for(int i=start; i<=end; i++){if(i==current){out.write("<span class=current>"+i+"</span>&nbsp;");}else{
%>
<a class=flag_pg href="<%=path%>/s?q=<%=q%>&amp;p=<%=i%>&amp;m=<%=m%>&amp;t=<%=type%>"><%=i%></a>
<%	}}if(current<totalPage){%>
      <a class=next 
      href="<%=path%>/s?q=<%=q%>&amp;p=<%=current+1%>&amp;m=<%=m%>&amp;t=<%=type%>">&gt;</a> 
<%
}
}
%>
</div>
<%if(totalItem!=0){%>
<div class="abs">
<form name=form2 action="s" method="get"><input id="s1" type="hidden" name="m" value="<%=m%>" /> <input class='search_input' value="${requestScope.result.keyword}" name="q" ><input id='s2' class='search_button' type='submit' value="安卓快搜" /> </form>
</div>
<%}%>
<div><a href="<%=path%>/index.jsp">快搜首页</a></div>
<div class="cp">&copy; 2011 安卓快搜  <br/>联系我们:duapk.com@gmail.com
<div style="display:none"><script src="http://s21.cnzz.com/stat.php?id=2981572&web_id=2981572&show=pic1" language="JavaScript"></script></div><br/>
<%= DateUtil.dateToString(new Date(),DateUtil.STRING_DATE_FORMAT) %></div>
</div>
</body></html>